function phoneSDK(){
    var amount = localStorage.getItem('amount');
    var orderNo = localStorage.getItem('out_order_no');
    var Type=localStorage.getItem('order_type');
    var qrcode=localStorage.getItem('qrcode');
    var scanAmount=localStorage.getItem('scanAmount');

    var browser = {
        versions: function() {
            var u = navigator.userAgent;
            var app = navigator.appVersion;
            return {

                android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,

                iPhone: u.indexOf('iPhone') > -1 ,

                iPad: u.indexOf('iPad') > -1,
                iPod: u.indexOf('iPod') > -1,

            };
        } (),
        language: (navigator.browserLanguage || navigator.language).toLowerCase()
    }
    if (browser.versions.iPhone||browser.versions.iPad||browser.versions.iPod){
        //如果是ios系統，
//        loadURL('www.baidu.com?amount='+amount+'&orderNo='+orderNo+'&type='+Type);
        var map=new Array();
        map[0]=amount;
        map[1]="";
        map[2]=orderNo;
        map[3]=Type;


        window.webkit.messageHandlers.payWithSDk.postMessage(map);
        window.webkit.messageHandlers.scanWithSDk.getAmount();
    }
    else if(browser.versions.android){
        walletSDk.payWithSDk(amount,"",orderNo,Type);
        walletSDk.scanWithSDK(qrcode);
    }

}
function getamount(){
    var amount = localStorage.getItem('amount');
    var orderNo = localStorage.getItem('out_order_no');
    var Type=localStorage.getItem('order_type');
    var qrcode=localStorage.getItem('qrcode');

    var browser = {
        versions: function() {
            var u = navigator.userAgent;
            var app = navigator.appVersion;
            return {

                android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,

                iPhone: u.indexOf('iPhone') > -1 ,

                iPad: u.indexOf('iPad') > -1,
                iPod: u.indexOf('iPod') > -1,

            };
        } (),
        language: (navigator.browserLanguage || navigator.language).toLowerCase()
    }
    if (browser.versions.iPhone||browser.versions.iPad||browser.versions.iPod){
        //如果是ios系統，
//        loadURL('www.baidu.com?amount='+amount+'&orderNo='+orderNo+'&type='+Type);
        window.webkit.messageHandlers.scanWithSDk.getAmount(scanAmount);
    }
    else if(browser.versions.android){
        walletSDk.scanWithSDK(scanAmount);
    }

}
//function loadURL(url) {
//    var iFrame;
//    iFrame = document.createElement("iframe");
//    iFrame.setAttribute("src", url);
//    iFrame.setAttribute("style", "display:none;");
//    iFrame.setAttribute("height", "0px");
//    iFrame.setAttribute("width", "0px");
//    iFrame.setAttribute("frameborder", "0");
//    document.body.appendChild(iFrame);
//    // 发起请求后这个iFrame就没用了，所以把它从dom上移除掉
//    iFrame.parentNode.removeChild(iFrame);
//    iFrame = null;
//}
